#include "Snow.h"
#include"Physics.h"
#include"Body.h"

Snow::Snow(void)
{
	vy = .5;
}


Snow::~Snow(void)
{
}
void Snow::update()
{
	GameObject::update();
	Physics* vatly = (Physics*)getComponentById(PHYSICS);

	if(vatly->getPosition().y<0)
	{		
		vatly->_pos.y=700;		
	}	
	if(vatly->getPosition().y<600)
	{
		vatly->setV(0,-vy);
	}
}
D3DXVECTOR2 Snow::getPosition()
{
	Physics* vatly = (Physics*)getComponentById(PHYSICS);
	return vatly->getPosition();
}